(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
f(x1) → n(c(n(a(x1))))
c(f(x1)) → f(n(a(c(x1))))
n(a(x1)) → c(x1)
c(c(x1)) → c(x1)
n(s(x1)) → f(s(s(x1)))
n(f(x1)) → f(n(x1))
Rewrite Strategy: INNERMOST
(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)
Converted CpxTRS to CDT
(2) Obligation:
Complexity Dependency Tuples Problem
Rules:
f(z0) → n(c(n(a(z0))))
c(f(z0)) → f(n(a(c(z0))))
c(c(z0)) → c(z0)
n(a(z0)) → c(z0)
n(s(z0)) → f(s(s(z0)))
n(f(z0)) → f(n(z0))
Tuples:
F(z0) → c1(N(c(n(a(z0)))), C(n(a(z0))), N(a(z0)))
C(f(z0)) → c2(F(n(a(c(z0)))), N(a(c(z0))), C(z0))
C(c(z0)) → c3(C(z0))
N(a(z0)) → c4(C(z0))
N(s(z0)) → c5(F(s(s(z0))))
N(f(z0)) → c6(F(n(z0)), N(z0))
S tuples:
F(z0) → c1(N(c(n(a(z0)))), C(n(a(z0))), N(a(z0)))
C(f(z0)) → c2(F(n(a(c(z0)))), N(a(c(z0))), C(z0))
C(c(z0)) → c3(C(z0))
N(a(z0)) → c4(C(z0))
N(s(z0)) → c5(F(s(s(z0))))
N(f(z0)) → c6(F(n(z0)), N(z0))
K tuples:none
Defined Rule Symbols:
f, c, n
Defined Pair Symbols:
F, C, N
Compound Symbols:
c1, c2, c3, c4, c5, c6
(3) CdtUnreachableProof (EQUIVALENT transformation)
The following tuples could be removed as they are not reachable from basic start terms:
C(f(z0)) → c2(F(n(a(c(z0)))), N(a(c(z0))), C(z0))
N(f(z0)) → c6(F(n(z0)), N(z0))
(4) Obligation:
Complexity Dependency Tuples Problem
Rules:
f(z0) → n(c(n(a(z0))))
c(f(z0)) → f(n(a(c(z0))))
c(c(z0)) → c(z0)
n(a(z0)) → c(z0)
n(s(z0)) → f(s(s(z0)))
n(f(z0)) → f(n(z0))
Tuples:
F(z0) → c1(N(c(n(a(z0)))), C(n(a(z0))), N(a(z0)))
N(a(z0)) → c4(C(z0))
N(s(z0)) → c5(F(s(s(z0))))
C(c(z0)) → c3(C(z0))
S tuples:
F(z0) → c1(N(c(n(a(z0)))), C(n(a(z0))), N(a(z0)))
C(c(z0)) → c3(C(z0))
N(a(z0)) → c4(C(z0))
N(s(z0)) → c5(F(s(s(z0))))
K tuples:none
Defined Rule Symbols:
f, c, n
Defined Pair Symbols:
F, N, C
Compound Symbols:
c1, c4, c5, c3
(5) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
F(z0) → c1(N(c(n(a(z0)))), C(n(a(z0))), N(a(z0)))
We considered the (Usable) Rules:
n(a(z0)) → c(z0)
c(c(z0)) → c(z0)
And the Tuples:
F(z0) → c1(N(c(n(a(z0)))), C(n(a(z0))), N(a(z0)))
N(a(z0)) → c4(C(z0))
N(s(z0)) → c5(F(s(s(z0))))
C(c(z0)) → c3(C(z0))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(C(x1)) = 0
POL(F(x1)) = [1]
POL(N(x1)) = [2]x1
POL(a(x1)) = 0
POL(c(x1)) = 0
POL(c1(x1, x2, x3)) = x1 + x2 + x3
POL(c3(x1)) = x1
POL(c4(x1)) = x1
POL(c5(x1)) = x1
POL(n(x1)) = [4]
POL(s(x1)) = [3]
(6) Obligation:
Complexity Dependency Tuples Problem
Rules:
f(z0) → n(c(n(a(z0))))
c(f(z0)) → f(n(a(c(z0))))
c(c(z0)) → c(z0)
n(a(z0)) → c(z0)
n(s(z0)) → f(s(s(z0)))
n(f(z0)) → f(n(z0))
Tuples:
F(z0) → c1(N(c(n(a(z0)))), C(n(a(z0))), N(a(z0)))
N(a(z0)) → c4(C(z0))
N(s(z0)) → c5(F(s(s(z0))))
C(c(z0)) → c3(C(z0))
S tuples:
C(c(z0)) → c3(C(z0))
N(a(z0)) → c4(C(z0))
N(s(z0)) → c5(F(s(s(z0))))
K tuples:
F(z0) → c1(N(c(n(a(z0)))), C(n(a(z0))), N(a(z0)))
Defined Rule Symbols:
f, c, n
Defined Pair Symbols:
F, N, C
Compound Symbols:
c1, c4, c5, c3
(7) CdtKnowledgeProof (EQUIVALENT transformation)
The following tuples could be moved from S to K by knowledge propagation:
N(a(z0)) → c4(C(z0))
N(s(z0)) → c5(F(s(s(z0))))
F(z0) → c1(N(c(n(a(z0)))), C(n(a(z0))), N(a(z0)))
(8) Obligation:
Complexity Dependency Tuples Problem
Rules:
f(z0) → n(c(n(a(z0))))
c(f(z0)) → f(n(a(c(z0))))
c(c(z0)) → c(z0)
n(a(z0)) → c(z0)
n(s(z0)) → f(s(s(z0)))
n(f(z0)) → f(n(z0))
Tuples:
F(z0) → c1(N(c(n(a(z0)))), C(n(a(z0))), N(a(z0)))
N(a(z0)) → c4(C(z0))
N(s(z0)) → c5(F(s(s(z0))))
C(c(z0)) → c3(C(z0))
S tuples:
C(c(z0)) → c3(C(z0))
K tuples:
F(z0) → c1(N(c(n(a(z0)))), C(n(a(z0))), N(a(z0)))
N(a(z0)) → c4(C(z0))
N(s(z0)) → c5(F(s(s(z0))))
Defined Rule Symbols:
f, c, n
Defined Pair Symbols:
F, N, C
Compound Symbols:
c1, c4, c5, c3
(9) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)
Use narrowing to replace
F(
z0) →
c1(
N(
c(
n(
a(
z0)))),
C(
n(
a(
z0))),
N(
a(
z0))) by
F(z0) → c1(N(c(c(z0))), C(n(a(z0))), N(a(z0)))
(10) Obligation:
Complexity Dependency Tuples Problem
Rules:
f(z0) → n(c(n(a(z0))))
c(f(z0)) → f(n(a(c(z0))))
c(c(z0)) → c(z0)
n(a(z0)) → c(z0)
n(s(z0)) → f(s(s(z0)))
n(f(z0)) → f(n(z0))
Tuples:
N(a(z0)) → c4(C(z0))
N(s(z0)) → c5(F(s(s(z0))))
C(c(z0)) → c3(C(z0))
F(z0) → c1(N(c(c(z0))), C(n(a(z0))), N(a(z0)))
S tuples:
C(c(z0)) → c3(C(z0))
K tuples:
F(z0) → c1(N(c(n(a(z0)))), C(n(a(z0))), N(a(z0)))
N(a(z0)) → c4(C(z0))
N(s(z0)) → c5(F(s(s(z0))))
Defined Rule Symbols:
f, c, n
Defined Pair Symbols:
N, C, F
Compound Symbols:
c4, c5, c3, c1
(11) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)
Use narrowing to replace
F(
z0) →
c1(
N(
c(
c(
z0))),
C(
n(
a(
z0))),
N(
a(
z0))) by
F(z0) → c1(N(c(z0)), C(n(a(z0))), N(a(z0)))
F(c(z0)) → c1(N(c(c(z0))), C(n(a(c(z0)))), N(a(c(z0))))
(12) Obligation:
Complexity Dependency Tuples Problem
Rules:
f(z0) → n(c(n(a(z0))))
c(f(z0)) → f(n(a(c(z0))))
c(c(z0)) → c(z0)
n(a(z0)) → c(z0)
n(s(z0)) → f(s(s(z0)))
n(f(z0)) → f(n(z0))
Tuples:
N(a(z0)) → c4(C(z0))
N(s(z0)) → c5(F(s(s(z0))))
C(c(z0)) → c3(C(z0))
F(z0) → c1(N(c(z0)), C(n(a(z0))), N(a(z0)))
F(c(z0)) → c1(N(c(c(z0))), C(n(a(c(z0)))), N(a(c(z0))))
S tuples:
C(c(z0)) → c3(C(z0))
K tuples:
F(z0) → c1(N(c(n(a(z0)))), C(n(a(z0))), N(a(z0)))
N(a(z0)) → c4(C(z0))
N(s(z0)) → c5(F(s(s(z0))))
Defined Rule Symbols:
f, c, n
Defined Pair Symbols:
N, C, F
Compound Symbols:
c4, c5, c3, c1
(13) CdtUnreachableProof (EQUIVALENT transformation)
The following tuples could be removed as they are not reachable from basic start terms:
F(c(z0)) → c1(N(c(c(z0))), C(n(a(c(z0)))), N(a(c(z0))))
(14) Obligation:
Complexity Dependency Tuples Problem
Rules:
f(z0) → n(c(n(a(z0))))
c(f(z0)) → f(n(a(c(z0))))
c(c(z0)) → c(z0)
n(a(z0)) → c(z0)
n(s(z0)) → f(s(s(z0)))
n(f(z0)) → f(n(z0))
Tuples:
N(a(z0)) → c4(C(z0))
N(s(z0)) → c5(F(s(s(z0))))
F(z0) → c1(N(c(z0)), C(n(a(z0))), N(a(z0)))
C(c(z0)) → c3(C(z0))
S tuples:
C(c(z0)) → c3(C(z0))
K tuples:
N(a(z0)) → c4(C(z0))
N(s(z0)) → c5(F(s(s(z0))))
Defined Rule Symbols:
f, c, n
Defined Pair Symbols:
N, F, C
Compound Symbols:
c4, c5, c1, c3
(15) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)
Use narrowing to replace
F(
z0) →
c1(
N(
c(
z0)),
C(
n(
a(
z0))),
N(
a(
z0))) by
F(c(z0)) → c1(N(c(z0)), C(n(a(c(z0)))), N(a(c(z0))))
F(x0) → c1(C(n(a(x0))), N(a(x0)))
(16) Obligation:
Complexity Dependency Tuples Problem
Rules:
f(z0) → n(c(n(a(z0))))
c(f(z0)) → f(n(a(c(z0))))
c(c(z0)) → c(z0)
n(a(z0)) → c(z0)
n(s(z0)) → f(s(s(z0)))
n(f(z0)) → f(n(z0))
Tuples:
N(a(z0)) → c4(C(z0))
N(s(z0)) → c5(F(s(s(z0))))
C(c(z0)) → c3(C(z0))
F(c(z0)) → c1(N(c(z0)), C(n(a(c(z0)))), N(a(c(z0))))
F(x0) → c1(C(n(a(x0))), N(a(x0)))
S tuples:
C(c(z0)) → c3(C(z0))
K tuples:
N(a(z0)) → c4(C(z0))
N(s(z0)) → c5(F(s(s(z0))))
Defined Rule Symbols:
f, c, n
Defined Pair Symbols:
N, C, F
Compound Symbols:
c4, c5, c3, c1, c1
(17) CdtUnreachableProof (EQUIVALENT transformation)
The following tuples could be removed as they are not reachable from basic start terms:
F(c(z0)) → c1(N(c(z0)), C(n(a(c(z0)))), N(a(c(z0))))
(18) Obligation:
Complexity Dependency Tuples Problem
Rules:
f(z0) → n(c(n(a(z0))))
c(f(z0)) → f(n(a(c(z0))))
c(c(z0)) → c(z0)
n(a(z0)) → c(z0)
n(s(z0)) → f(s(s(z0)))
n(f(z0)) → f(n(z0))
Tuples:
N(a(z0)) → c4(C(z0))
N(s(z0)) → c5(F(s(s(z0))))
F(x0) → c1(C(n(a(x0))), N(a(x0)))
C(c(z0)) → c3(C(z0))
S tuples:
C(c(z0)) → c3(C(z0))
K tuples:
N(a(z0)) → c4(C(z0))
N(s(z0)) → c5(F(s(s(z0))))
Defined Rule Symbols:
f, c, n
Defined Pair Symbols:
N, F, C
Compound Symbols:
c4, c5, c1, c3
(19) CdtGraphRemoveDanglingProof (BOTH BOUNDS(ID, ID) transformation)
Removed 1 of 4 dangling nodes:
N(s(z0)) → c5(F(s(s(z0))))
(20) Obligation:
Complexity Dependency Tuples Problem
Rules:
f(z0) → n(c(n(a(z0))))
c(f(z0)) → f(n(a(c(z0))))
c(c(z0)) → c(z0)
n(a(z0)) → c(z0)
n(s(z0)) → f(s(s(z0)))
n(f(z0)) → f(n(z0))
Tuples:
N(a(z0)) → c4(C(z0))
F(x0) → c1(C(n(a(x0))), N(a(x0)))
C(c(z0)) → c3(C(z0))
S tuples:
C(c(z0)) → c3(C(z0))
K tuples:
N(a(z0)) → c4(C(z0))
Defined Rule Symbols:
f, c, n
Defined Pair Symbols:
N, F, C
Compound Symbols:
c4, c1, c3
(21) CdtGraphSplitRhsProof (BOTH BOUNDS(ID, ID) transformation)
Split RHS of tuples not part of any SCC
(22) Obligation:
Complexity Dependency Tuples Problem
Rules:
f(z0) → n(c(n(a(z0))))
c(f(z0)) → f(n(a(c(z0))))
c(c(z0)) → c(z0)
n(a(z0)) → c(z0)
n(s(z0)) → f(s(s(z0)))
n(f(z0)) → f(n(z0))
Tuples:
N(a(z0)) → c4(C(z0))
C(c(z0)) → c3(C(z0))
F(x0) → c2(C(n(a(x0))))
F(x0) → c2(N(a(x0)))
S tuples:
C(c(z0)) → c3(C(z0))
K tuples:
N(a(z0)) → c4(C(z0))
Defined Rule Symbols:
f, c, n
Defined Pair Symbols:
N, C, F
Compound Symbols:
c4, c3, c2
(23) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^2))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
C(c(z0)) → c3(C(z0))
We considered the (Usable) Rules:
n(a(z0)) → c(z0)
c(c(z0)) → c(z0)
And the Tuples:
N(a(z0)) → c4(C(z0))
C(c(z0)) → c3(C(z0))
F(x0) → c2(C(n(a(x0))))
F(x0) → c2(N(a(x0)))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(C(x1)) = [2]x1
POL(F(x1)) = [2] + [3]x1 + x12
POL(N(x1)) = [3]x1 + x12
POL(a(x1)) = x1
POL(c(x1)) = [1] + x1
POL(c2(x1)) = x1
POL(c3(x1)) = x1
POL(c4(x1)) = x1
POL(n(x1)) = [1] + x1
(24) Obligation:
Complexity Dependency Tuples Problem
Rules:
f(z0) → n(c(n(a(z0))))
c(f(z0)) → f(n(a(c(z0))))
c(c(z0)) → c(z0)
n(a(z0)) → c(z0)
n(s(z0)) → f(s(s(z0)))
n(f(z0)) → f(n(z0))
Tuples:
N(a(z0)) → c4(C(z0))
C(c(z0)) → c3(C(z0))
F(x0) → c2(C(n(a(x0))))
F(x0) → c2(N(a(x0)))
S tuples:none
K tuples:
N(a(z0)) → c4(C(z0))
C(c(z0)) → c3(C(z0))
Defined Rule Symbols:
f, c, n
Defined Pair Symbols:
N, C, F
Compound Symbols:
c4, c3, c2
(25) SIsEmptyProof (EQUIVALENT transformation)
The set S is empty
(26) BOUNDS(O(1), O(1))